package com.tlias.exam.controller;

import com.tlias.exam.pojo.GoodsCate;
import com.tlias.exam.pojo.Result;
import com.tlias.exam.service.GoodCateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * TODO
 *
 * @Author mr.luo
 * @Date 29 4月 2025 17:49
 */
@RestController
public class GoodCateController {
    @Autowired
    private GoodCateService goodCateService;
    /**
     * 查询商品分类
     */
    @GetMapping("/good/cate")
    public Result getGoods(){
     List<GoodsCate> goodsCates = goodCateService.select();
        return Result.success(goodsCates);
    }
}
